package com.cookie.lib_base.helper

import android.content.Context
import com.cookie.lib_base.R

/**
 *   文件名:    ConstellHelper
 *   创建者:    cookie
 *   创建时间:   2020/10/22 17:47
 *   描述:      星座帮助类
 */
object ConstellHelper {

    private lateinit var mNameArray: Array<String>
    private lateinit var mTimeArray: Array<String>

    fun initHelper(mContext: Context) {
        mNameArray = mContext.resources.getStringArray(R.array.ConstellArray)
        mTimeArray = mContext.resources.getStringArray(R.array.ConstellTimeArray)
    }

    fun getConstellTime(constellName:String): String {
        mNameArray.forEachIndexed { index, s ->
            if (s == constellName){
                return  mTimeArray[index]
            }
        }
        return "查询不到结果"
    }
}